<?php 
	// pr($pagamento);
	$langlist = $this->Session->read("langlist");
?>
<link rel="stylesheet" href="<?php echo $this->webroot;?>css/bootstrap-tagsinput.css"/>
<script type="text/javascript" src="<?php echo $this->webroot;?>js/typeahead.min.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot;?>js/bootstrap-tagsinput.min.js"></script>

<div class="row">
      <div class="col-md-3">
			<div class="<?php echo $pagamento["Metodo"]["code"]; ?> thumbnail" ></div>
      </div>
      <div class="col-md-9">
			<h1 class="text-center" ><?php echo __("Metodo di pagamento - %s", $pagamento["Metodo"]["CategoryLang"][0]["name"]); ?></h1>
			<h2 class="text-center"><?php echo __("Bookmaker - %s", $pagamento["Bookmaker"]["nome"]); ?></h2>
      </div>
</div>

	<div class="row">
          <div class="col-md-3">
              <a href="<?php echo $this->webroot?>Bookmakers/links/<?php echo $pagamento["Bookmaker"]["id"]; ?>"><img class="thumbnail" id="logo" src="<?php echo $this->webroot.$pagamento["Bookmaker"]["Logo"]["webpath"];?>"></a>
          </div>
          <div class="col-md-9">
				<div class="row">
		          <div class="col-md-12" style="text-align: justify">
			        <?php echo html_entity_decode($pagamento["Pagamento"]["descrizione"] ,ENT_QUOTES);?>
		          </div>
		          	<br>
		        </div>
				<div class="row">
		          <div class="col-md-6">
		            <label for="bonus"><?php echo __("Commissione versamento");?>:&nbsp;</label><?php echo $pagamento["Pagamento"]["commissione_versamento"];?>
		          </div>   
		          <div class="col-md-6">
		            <label for="bonus"><?php echo __("Tempo accredito versamento");?>:&nbsp;</label><?php echo $pagamento["Pagamento"]["tempo_accredito_versamento"];?>
		          </div>   
		        </div>
				<div class="row">
		          <div class="col-md-6">
		            <label for="bonus"><?php echo __("Commissione prelievo");?>:&nbsp;</label><?php echo $pagamento["Pagamento"]["commissione_prelievo"];?>
		          </div>   
		          <div class="col-md-6">
		            <label for="bonus"><?php echo __("Tempo accredito prelievo");?>:&nbsp;</label><?php echo $pagamento["Pagamento"]["tempo_accredito_prelievo"];?>
		          </div>   
		        </div>
          </div>
	</div>
	<div class="row">
          <div class="col-md-12">
	           <h3 class="text-center"><?php echo __("Registrati"); ?></h3>

	           <div class="row">
			       <?php foreach($pagamento["Bookmaker"]["Links"] as $link){ ?>
			       	<div class="col-md-2">
		    	       <nobr><a href="<?php echo $link["link"] ?>" target="_blank" class="link" ><i class="<?php echo "famfamfam-flag-".$langlist[$link["lang_id"]]["code"]; ?>"></i>&nbsp;<?php echo $langlist[$link["lang_id"]]["name"]; ?></a></nobr>
		           </div>
		           <?php }?>
	           </div>
          </div>      
	</div>

  <script>
	
    
    function format(data) {
        console.log(data);
        return "<img class='banner_thumb' src='<?php echo $this->webroot?>" + data.id + "'/>" + data.text;
    }
    
    $(".link").on("click",function(e){
        // e.preventDefault();
        ga('send','event','payment','click','newuser');
        // return true;
    });
      
  </script>